import java.util.Scanner;

public class test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder s1 = new StringBuilder(sc.nextLine());
        StringBuilder s2 = new StringBuilder(sc.nextLine());

        //String s3 = new String(s1);
        for (int i = 0; i < s2.length(); i++) {
            //s3 = new String(s1);
            for (int j = s1.length() - 1; j >= 0; j--) {
                if (s1.charAt(j) == s2.charAt(i)) {
                    s1.deleteCharAt(j);
                }
            }
        }
        System.out.println(s1);
    }
    Scanner sc = new Scanner(System.in);

}
